package org.gruposp2p.dnie.client.event;

import org.gruposp2p.dnie.client.dto.StatisticDTO;
import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;

public class StatisticChangeEvent extends GwtEvent {
	
	private static final GwtEvent.Type TYPE = new GwtEvent.Type();
	
	public StatisticDTO statistic;
	
	public static final int OPTION_EDITED  = 0;
	public static final int OPTION_DELETED = 1;
	      
	public static GwtEvent.Type getType(){
	   return TYPE;
	}
	   
	@Override
	public Type getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(EventHandler handler) {
		((StatisticChangeHandler)handler).processStatistic(this);		
	}
	
	public StatisticChangeEvent (StatisticDTO statistic) {
		this.statistic = statistic;
	}

}